<template>
  <ListLayout class="zcgl-xmgl-glht-wrap">
    <el-table slot="table" :data="page.list" class="background-table" lazy height="100%">
      <el-table-column show-overflow-tooltip label="组织机构" prop="orgName">
        <template slot-scope="props">
          <p>{{props.row.htbh}}</p>
          <p>乙方：{{props.row.company}}</p>
        </template>
      </el-table-column>
      <el-table-column show-overflow-tooltip label="签署时间" prop="qstime"></el-table-column>
      <el-table-column show-overflow-tooltip label="合同有效期" >
            <template slot-scope="props">
          <p>{{props.row.yxStartTime}} - {{props.row.yxEndTime}}</p>
        </template>
      </el-table-column>
      <el-table-column show-overflow-tooltip label="租赁资源" prop="zlzy"></el-table-column>
      <el-table-column show-overflow-tooltip label="状态" prop="status"></el-table-column>
      <el-table-column label="操作" width="300">
        <template slot-scope="props">
          <el-button plain type="warning" @click="editPageHandler({ id: props.row.id})">详情</el-button>
        </template>
      </el-table-column>
    </el-table>
     <div slot="page">
      <el-pagination
        slot="page"
        background
        layout="total, prev, pager, next"
        :total="page.total"
        :page-size="page.pageSize"
        :current-page.sync="page.pageNum"
        @current-change="pageNoToggleHandler"
        @size-change="pageSizeToggleHandler"
      ></el-pagination>
    </div>
  </ListLayout>
</template>

<script>
export default JBoot({
  props: {},

  data() {
    return {
      moduleName: "fjgl",
      listMethod: "queryContract",
      deleteMethod: "removeDict",
      createPageName: "xmglEdit"
    };
  },

  computed: {},

  methods: {
    handleLoad(row, treeNode, resolve) {
      this.$api("xmgl", "queryChildren", { parentId: row.id }).then(
        response => {
          resolve(response.data || []);
        }
      );
    }
  },

  watch: {}
})
  .list()
  .build();
</script>

<style lang="scss">
.zcgl-xmgl-glht-wrap {
  width: 100%;
  height: 100%;
}
</style>
